﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BartonExtension;

namespace Backend
{
    public class ZKImageInfo
    {
        public const string content_type_image = "image";
        public const string content_type_video = "video";
        public const string content_type_audio = "audio";
        public string path { get; set; }
        public string title { get; set; }
        public string description { get; set; }
        public string content_type { get; set; }
        public string content_path { get; set; }

        public string xmlSerialize()
        {
            string xml = "<image>\n";
            xml += "<image_path>{0}</image_path>\n".FormatWith(path);
            xml += "<title><![CDATA[<div class='fwdTitleTextSkin1'>{0}</div>]]></title>\n".FormatWith(title);
            xml += "<description><![CDATA[<div class='fwdDescriptionTextSkin1'>{0}</div>]]></description>\n".FormatWith(description);
            xml += "<content_type>{0}</content_type>\n".FormatWith(content_type);
            xml += "<content>{0}</content>\n".FormatWith(content_path);
            xml += "</image>\n";
            return xml;
        }

    }
}
